package top.mcwebsite.lib.router.processor.utils

import com.squareup.kotlinpoet.ClassName
import com.squareup.kotlinpoet.ParameterizedTypeName
import com.squareup.kotlinpoet.TypeName

val TypeName.rawType: ClassName
    get() = when (this) {
        is ClassName -> this
        is ParameterizedTypeName -> this.rawType
        else -> throw IllegalArgumentException("Not support $this")
    }